<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('虾皮订单商品明细信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>订单号：</label>
                                <input type="text" name="orderSn"/>
                            </li>
                            <li>
                                <label>平台商品id：</label>
                                <input type="text" name="itemId"/>
                            </li>
                            <li>
                                <label>商品名称：</label>
                                <input type="text" name="itemName"/>
                            </li>
                            <li>
                                <label>主货号：</label>
                                <input type="text" name="sellerItemId"/>
                            </li>
                            <li>
                                <label>SKUID：</label>
                                <input type="text" name="modelId"/>
                            </li>
                            <li>
                                <label>SKU名称：</label>
                                <input type="text" name="modelName"/>
                            </li>
                            <li>
                                <label>SKU货号：</label>
                                <input type="text" name="sellerModelId"/>
                            </li>
                            <li>
                                <label>采购单价：</label>
                                <input type="text" name="purchasePrice"/>
                            </li>
                            <li>
                                <label>采购总价：</label>
                                <input type="text" name="purchaseTotalPrice"/>
                            </li>
                            <li>
                                <label>SKU数量：</label>
                                <input type="text" name="modelQuantityPurchased"/>
                            </li>
                            <li>
                                <label>SKU原始价格：</label>
                                <input type="text" name="modelOriginalPrice"/>
                            </li>
                            <li>
                                <label>SKU折后价格：</label>
                                <input type="text" name="modelDiscountedPrice"/>
                            </li>
                            <li>
                                <label>是否批发：</label>
                                <input type="text" name="wholesale"/>
                            </li>
                            <li>
                                <label>重量：</label>
                                <input type="text" name="weight"/>
                            </li>
                            <li>
                                <label>是否加购：</label>
                                <input type="text" name="addOnDeal"/>
                            </li>
                            <li>
                                <label>是否主商品：</label>
                                <input type="text" name="mainItem"/>
                            </li>
                            <li>
                                <label>加购ID：</label>
                                <input type="text" name="addOnDealId"/>
                            </li>
                            <li>
                                <label>创建时间：</label>
                                <input type="text" class="time-input" placeholder="请选择创建时间" name="createDate"/>
                            </li>
                            <li>
                                <label>最后修改时间：</label>
                                <input type="text" class="time-input" placeholder="请选择最后修改时间" name="lastUpdateDate"/>
                            </li>
                            <li>
                                <label>最后修改人：</label>
                                <input type="text" name="lastUpdateBy"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="order:OrderItem:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="order:OrderItem:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="order:OrderItem:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="order:OrderItem:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('order:OrderItem:edit')}]];
        var removeFlag = [[${@permission.hasPermi('order:OrderItem:remove')}]];
        var prefix = ctx + "order/OrderItem";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "虾皮订单商品明细信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'orderItemId',
                    title: '表的id',
                    visible: false
                },
                {
                    field: 'orderSn',
                    title: '订单号'
                },
                {
                    field: 'itemId',
                    title: '平台商品id'
                },
                {
                    field: 'itemName',
                    title: '商品名称'
                },
                {
                    field: 'sellerItemId',
                    title: '主货号'
                },
                {
                    field: 'modelId',
                    title: 'SKUID'
                },
                {
                    field: 'modelName',
                    title: 'SKU名称'
                },
                {
                    field: 'sellerModelId',
                    title: 'SKU货号'
                },
                {
                    field: 'purchasePrice',
                    title: '采购单价'
                },
                {
                    field: 'purchaseTotalPrice',
                    title: '采购总价'
                },
                {
                    field: 'modelQuantityPurchased',
                    title: 'SKU数量'
                },
                {
                    field: 'modelOriginalPrice',
                    title: 'SKU原始价格'
                },
                {
                    field: 'modelDiscountedPrice',
                    title: 'SKU折后价格'
                },
                {
                    field: 'wholesale',
                    title: '是否批发'
                },
                {
                    field: 'weight',
                    title: '重量'
                },
                {
                    field: 'addOnDeal',
                    title: '是否加购'
                },
                {
                    field: 'mainItem',
                    title: '是否主商品'
                },
                {
                    field: 'addOnDealId',
                    title: '加购ID'
                },
                {
                    field: 'promotionType',
                    title: '营销类型'
                },
                {
                    field: 'createDate',
                    title: '创建时间'
                },
                {
                    field: 'lastUpdateDate',
                    title: '最后修改时间'
                },
                {
                    field: 'lastUpdateBy',
                    title: '最后修改人'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.orderItemId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderItemId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>